package com.papper.common.service.sys;

import com.papper.common.bean.sys.SysAuth;
import com.papper.common.mapper.sys.SysAuthMapper;
import com.papper.common.service.ServiceImpl;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;

/**
 * @Author:LaJiao
 * @Date:2017-08-03 14:31:08
 * @Description:系统授权
 */
@Service("sysAuthService")
public class SysAuthService extends ServiceImpl<SysAuthMapper, SysAuth> {

	/**
	 * 根据授权ID返回授权信息
	 *
	 * @param authId the auth id
	 * @return the sys auth
	 */
	public SysAuth findByAuthId(String authId) {
		Example          example  = new Example(SysAuth.class);
		Example.Criteria criteria = example.createCriteria();
		criteria.andEqualTo("authId", authId);
		return findOne(example);
	}
}